package com.qst.liuxu;

public class Student {
    //属性
    private String stuName;
    private int stuAge;
    private double stuGrade;

    static {
        System.out.println("执行了父类Student的静态代码块");
    }

    {
        System.out.println("执行了父类Student的非静态代码块");
    }
    //行为
    public void doStuding(){
        System.out.println("I am studing");
    }

    //构造方法
    public Student() {
        System.out.println("执行了Student类的默认的构造方法");
    }
    public Student(String stuName, int stuAge, double stuGrade) {
        this.stuName = stuName;
        this.stuAge = stuAge;
        this.stuGrade = stuGrade;
        System.out.println("执行了Student类含有参数的构造方法");
    }

    public String getStuName() {
        return stuName;
    }

    public void setStuName(String stuName) {
        this.stuName = stuName;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    public double getStuGrade() {
        return stuGrade;
    }

    public void setStuGrade(double stuGrade) {
        this.stuGrade = stuGrade;
    }
}
